"use strict";
var nconf = require('nconf');
nconf.argv().env();

var fs = require('fs'),
    os = require('os'),
	mongodb = require('mongodb')


var server = new mongodb.Server("127.0.0.1",27017,{safe:true});//本地27017端口
new mongodb.Db('zspider',server,{safe:true}).open(function(error,client){//数据库：zspider
	if(error) throw error;
    webpage = new mongodb.Collection(client,'webpage');

	queueCrtl();
});

function queueCrtl() {

    setInterval(function(){
			webpage.count({},function(err,doc){console.log(111);});
    },500);
}

// webpage.insert({"html":html},function(err,doc){console.log(111);});
